home *** CD-ROM | disk | FTP | other *** search
/ Mission to McDonaldLand / Mission To McDonaldLand.iso / code.cst / 00031_Script_NO FLOOR < prev    next >
Text File  |  1998-10-29  |  4KB  |  119 lines

  1. on enterFrame
  2.   global heading
  3.   global move
  4.   global updown
  5.   global silly
  6.   global silly2
  7.   global nomore
  8.   global CStop
  9.   global restoration
  10.   global castrestore
  11.   
  12.   if CStop = 1 then 
  13.     if the mouseH < the locH of sprite 30 then set the member of sprite 30 = "Walk Left"
  14.     if the mouseH > the locH of sprite 30 then set the member of sprite 30 = "Walk Right"
  15.     abort
  16.   end if
  17.   
  18.   if silly > 0 then abort
  19.   if silly2 > 0 then abort
  20.   
  21.   if the mouseH > the locH of sprite 30 - 20 and the mouseH < the locH of sprite 30 + 20 then set move = 0
  22.   
  23.   if the mouseH > the locH of sprite 30 + 19 then 
  24.     set the member of sprite 30 = "Walk Right"
  25.     set heading = 2
  26.     set move = 1
  27.     set the locH of sprite 30 = the locH of sprite 30 + 15
  28.   end if
  29.   
  30.   if the mouseH < the locH of sprite 30 - 19 then 
  31.     set the member of sprite 30 = "Walk Left"
  32.     set heading = 1
  33.     set move = 1
  34.     set the locH of sprite 30 = the locH of sprite 30 - 15
  35.   end if
  36.   
  37.   if the mouseV > the locV of sprite 30 and the mouseV < the locV of sprite 30 + 50 then set updown = 0
  38.   
  39.   if the mouseV < the locV of sprite 30 then 
  40.     if the locV of sprite 30 > 100 then
  41.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  42.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  43.       set the locV of sprite 30 = the locV of sprite 30 - 8
  44.       set updown = 1
  45.     end if
  46.   end if
  47.   
  48.   if the mouseV > the locV of sprite 30 + 50 then 
  49.     if the locV of sprite 30 < 350 then
  50.       if move = 0 and heading = 1 then set the member of sprite 30 = "Walk Left"
  51.       if move = 0 and heading = 2 then set the member of sprite 30 = "Walk Right"
  52.       set the locV of sprite 30 = the locV of sprite 30 + 8
  53.       set updown = 1
  54.     end if
  55.   end if
  56.   
  57.   if the locH of sprite 30 > 550 then set the locH of sprite 30 = 550
  58.   
  59.   if the locH of sprite 30 < 100 then set the locH of sprite 30 = 100
  60.   
  61. end
  62.  
  63. on rightMouseDown
  64.   global silly
  65.   global silly2
  66.   global heading
  67.   global CStop
  68.   if CStop = 1 then abort
  69.   if the mouseH > the locH of sprite 30 - 60 and the mouseH < the locH of sprite 30 + 60 and silly < 1 then 
  70.     if heading = 1 then 
  71.       set the locH of sprite 30 = the locH of sprite 30 + 16
  72.       set the locV of sprite 30 = the locV of sprite 30 - 14
  73.       set the member of sprite 30 = "backflipL"
  74.     end if
  75.     if heading = 2 then 
  76.       set the locH of sprite 30 = the locH of sprite 30 - 16
  77.       set the locV of sprite 30 = the locV of sprite 30 - 14
  78.       set the member of sprite 30 = "backflipR"
  79.     end if
  80.     set silly = 1
  81.   end if
  82.   
  83.   if silly2 < 1 and (the mouseH < the locH of sprite 30 - 60 or the mouseH > the locH of sprite 30 + 60) then
  84.     if the locH of sprite 30 > 200 or heading = 2 then
  85.       set silly2 = 1
  86.       set the locV of sprite 30 = the locV of sprite 30 - 15
  87.       if heading = 2 then set the member of sprite 30 = "cartwheelR"
  88.       if heading = 1 then set the member of sprite 30 = "cartwheelL"
  89.     end if
  90.   end if
  91.   
  92. end
  93.  
  94.  
  95. on exitFrame
  96.   global silly
  97.   global silly2
  98.   global heading
  99.   if silly > 0 then set silly = silly + 1
  100.   if silly > 12 then
  101.     set silly = 0
  102.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 + 50
  103.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 - 50
  104.     set the locV of sprite 30 = the locV of sprite 30 + 14
  105.   end if
  106.   if silly2 > 0 then
  107.     if heading = 2 then set the locH of sprite 30 = the locH of sprite 30 + 20
  108.     if heading = 1 then set the locH of sprite 30 = the locH of sprite 30 - 20
  109.     set silly2 = silly2 + 1
  110.   end if
  111.   
  112.   if silly2 > 10 then 
  113.     set silly2 = 0
  114.     set the locV of sprite 30 = the locV of sprite 30 + 15
  115.   end if
  116.   
  117.   go the frame
  118. end
  119.